import Vue from 'vue'
import App from './App'
import store from './store'
import site from '@/api/config.js'
import config from './utils/config.js'; 
import request from './utils/request.js'
import uView from "uview-ui";
import api from "@/api/index"
import onerequest from './common/free-lib/request.js'

Vue.prototype.$api = api;
Vue.prototype.$site = site;	

import boxTitle from "@/components/boxTitle/index.vue"
Vue.component('box-title', boxTitle)

import musicControl from "@/components/musicControl/index.vue"
Vue.component('music-control', musicControl)

import {audio} from '@/plugins/audio/index.js'
Vue.prototype.$audio =audio
Vue.use(uView);

Vue.prototype.$H = request;
Vue.prototype.$C = onerequest;
// Vue.prototype.$api =api;
// 挂载Vuex
Vue.prototype.$store = store;
Vue.prototype.$config = config;
Vue.config.productionTip = false

//promise对象封装
Vue.prototype.$onLaunched = new Promise(resolve => {
  Vue.prototype.$isResolve = resolve
})

// 公共方法
import fun from './utils/function.js';  
Vue.prototype.$f = fun;

// Qui公共JS
import Qui from './uni_modules/q-view/js_sdk/index.js';  
Vue.prototype.$q = Qui;

// 此处为引用自定义顶部
import cuCustom from '@/colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom);
// import TnCustom from '@/components/TnCustom/TnCustom.vue'
// Vue.component('tn-custom', TnCustom)

App.mpType = 'app'

const app = new Vue({
	store,
	...App
})
app.$mount()